package com.his.dao.jpa;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.his.pojos.HisMedicalCard;

public interface LfqMedicalCardJpaDao extends CrudRepository<HisMedicalCard, Long> {
	@Query("select b from HisElectronicPrescription a, HisMedicalCard b "
			+ "where a.ylkNo=b.ylkNo and a.dzcfNo=:id")
    public HisMedicalCard selectHisMedicalCardByDzcfNo(@Param("id") long dzcfNo);
	
	@Query("select c from HisTakedrug a,HisOperation b,HisMedicalCard c "
			+ "where a.ssNo=b.ssNo and b.ylkNo=c.ylkNo and a.qyNo=:id")
	public HisMedicalCard selectHisMedicalCardByQyNo(@Param("id") long qyNo);
	
}
